---
description: "Customize your GraphQL endpoint's HTTP method with Sofa. Learn how to easily switch between GET and POST using the routes parameter for specific queries or mutations. #GraphQL #Sofa"
---

import { Callout } from '@theguild/components';

# Customize Endpoint's HTTP Method

Sofa allows you to customize the http method. For example, in case you need `POST` instead of `GET` method in one of your query, you do the following:

```js
api.use(
  '/api',
  useSofa({
    schema,
    routes: {
      'Query.feed': { method: 'POST' },
    },
  })
);
```

When Sofa tries to define a route for `feed` of `Query`, instead of exposing it under `GET` (default for Query type) it will use `POST` method.

<Callout type="info">
  Pattern is easy: `Type.field` where `Type` is your query or mutation type.
</Callout>
